package com.yingpai.fitness.dvp_2_0.main.activity;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;

import com.yingpai.fitness.R;
import com.yingpai.fitness.dvp_2_0.common.activity.CommonActivity;
import com.yingpai.fitness.dvp_2_0.common.util.constant.Contacts;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by ASUS on 2019/2/21.
 */

public class WebViewForBannerActivity extends CommonActivity {

    @BindView(R.id.webview)
    WebView webview;
    @BindView(R.id.back)
    ImageView back;
    String bannerLink_title;
    String bannerLink_url;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setStatusFlag(Contacts.NORMAL_STATUS);
        setContentView(R.layout.activity_webview);
    }

    @Override
    protected void initView() {
        Bundle bundle = getIntent().getExtras();
        if (bundle != null) {
            bannerLink_title = bundle.getString("bannerLink_title");
            bannerLink_url = bundle.getString("bannerLink_url");
            setTitle(bannerLink_title);
            webview.getSettings().setUseWideViewPort(true);
            webview.getSettings().setLoadWithOverviewMode(true);
            webview.loadUrl(bannerLink_url);
        }

        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finishActivity();
            }
        });
    }

    @Override
    protected void initData() {

    }

    @Override
    @OnClick({})
    public void onViewClicked(View view) {
        super.onViewClicked(view);
        switch (view.getId()) {

        }
    }
}